package com.zmn.plat.services.impl.service.item.config;

import java.util.Date;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zmn.plat.model.entity.service.item.config.ServiceItemTimeConfig;
import com.zmn.plat.model.entity.service.item.config.ServiceItemTimeConfigQuery;
import com.zmn.plat.persistence.interfaces.service.item.config.ServiceItemTimeConfigDao;
import com.zmn.plat.services.interfaces.service.item.config.ServiceItemTimeConfigService;

/**
 * @author tanbiao
 * @description
 * @modifier
 * @since 2020/7/30 15:15
 **/
@Service
public class ServiceItemTimeConfigServiceImpl implements ServiceItemTimeConfigService {
    @Resource
    private ServiceItemTimeConfigDao faultItemTimeConfigDao;

    @Override
    public ServiceItemTimeConfig findByKey(Integer configId) {
        return faultItemTimeConfigDao.findByKey(configId);
    }

    @Override
    public List<ServiceItemTimeConfig> listPageByQuery(ServiceItemTimeConfigQuery query) {
        int count = countByQuery(query);
        query.setTotalCount(count);
        return faultItemTimeConfigDao.listPageByQuery(query);
    }

    @Override
    public List<ServiceItemTimeConfig> listByQuery(ServiceItemTimeConfigQuery query) {
        return faultItemTimeConfigDao.listByQuery(query);
    }

    @Override
    public List<ServiceItemTimeConfig> listByItemId(Integer itemId) {
        return faultItemTimeConfigDao.listByItemId(itemId);
    }

    @Override
    public List<ServiceItemTimeConfig> listByItemIdList(List<Integer> itemIds) {
        return faultItemTimeConfigDao.listByItemIdList(itemIds);
    }

    @Override
    public List<ServiceItemTimeConfig> listByGroupIds(List<Integer> faultGroupIds) {
        return faultItemTimeConfigDao.listByGroupIds(faultGroupIds);
    }

    @Override
    public List<Integer> listNotShowItemByTime(Date date) {
        return faultItemTimeConfigDao.listNotShowItemByTime(date);
    }

    @Override
    public List<ServiceItemTimeConfig> listAll() {
        return faultItemTimeConfigDao.listAll();
    }

    @Override
    public Integer countByQuery(ServiceItemTimeConfigQuery query) {
        return faultItemTimeConfigDao.countByQuery(query);
    }

    @Override
    public Integer updateByKey(ServiceItemTimeConfig faultItemTimeConfig) {
        return faultItemTimeConfigDao.updateByKey(faultItemTimeConfig);
    }

    @Override
    public Integer insert(ServiceItemTimeConfig faultItemTimeConfig) {
        return faultItemTimeConfigDao.insert(faultItemTimeConfig);
    }

    @Override
    public Integer insertBatch(List<ServiceItemTimeConfig> list) {
        return faultItemTimeConfigDao.insertBatch(list);
    }

    @Override
    public Integer deleteByKey(Integer configId) {
        return faultItemTimeConfigDao.deleteByKey(configId);
    }

    @Override
    public Integer deleteByConfig(ServiceItemTimeConfig config) {
        return faultItemTimeConfigDao.deleteByConfig(config);
    }

    @Override
    public Integer deleteByItemId(Integer itemId) {
        return faultItemTimeConfigDao.deleteByItemId(itemId);
    }
}
